//
//  HUDView.m
//  OpenEyes
//
//  Created by dllo on 15/9/21.
//  Copyright (c) 2015年 dllo. All rights reserved.
//

#import "HUDView.h"

@implementation HUDView
- (instancetype)init
{
    self = [super init];
    if (self) {
        self.frame = CGRectMake(WIDTH *0.5 - W * 90, HEIGHT * 0.5- H * 60, W * 180, H * 120);
        [self createHUD];
    }
    return self;
}

- (void)createHUD
{
    //菊花
    self.HUD = [MBProgressHUD showHUDAddedTo:self animated:YES];
    _HUD.removeFromSuperViewOnHide = YES;
    _HUD.labelText = @"loading.....";
    //    self.HUD.backgroundColor=[UIColor cyanColor];
    [self addSubview:_HUD];
    _HUD.mode = MBProgressHUDModeIndeterminate;
}

- (void)removeHUD
{
    [self.HUD  removeFromSuperview];
}



@end
